#ifndef COIN_H
#define COIN_H

#include <QPushButton>
#include <QTimer>

class Coin : public QPushButton
{
	Q_OBJECT
public:
//	explicit Coin(QWidget *parent = nullptr);
	Coin(QString img);

	// 金币属性
	int posX;
	int posY;
	bool flag;

	// 改变标志，金币变银币
	void change_flag();
	QTimer * timer1;
	QTimer * timer2;
	int min = 1;
	int max = 8;

	//判断是否正在执行动画
	bool isAnimation = false;

	//重写按下事件，防止连续翻转，动画播放顺序打乱
	void mousePressEvent(QMouseEvent *e);

signals:

public slots:
};

#endif // COIN_H
